﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Role.aspx.cs" Inherits="System_Role_Role" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
    <style type="text/css">
        ul.rightTools
        {
            float: right;
            display: block;
        }
        ul.rightTools li
        {
            float: left;
            display: block;
            margin-left: 5px;
        }
    </style>
    <div class="pageContent" style="padding: 5px">
    <input type="hidden" id="rel" value="<%=rel %>" />
        <div class="panel" defh="25">
            <h1>
                角色基本信息</h1>
            <div>
                <a class="button" target="dialog" href="Role/RoleAdd.aspx?rel=<%= rel%>" mask="true" style="padding-right: 10px;">
                    <span>创建角色</span></a> <a class="button" href="Ajax/Role.ashx?title=delete&rel=<%= rel%>" mask="true"  title="确实要删除这些记录吗?"
                        target="selectedTodo" rel="ids" posttype="string"  style="padding-right: 10px;">
                        <span>删除</span></a> <a  href="javascript:;" onclick="RoleEdit()"
                            warn="请选择一个用户" class="button" mask="true" ><span>修改</span></a>
                <%--病人编号：<input type="text" name="patientNo" />--%>
                <ul class="rightTools">
                    <li>
                        <%--<a class="button" target="dialog" href="demo/pagination/dialog1.html" mask="true"><span>创建病例</span></a>--%></li>
                </ul>
            </div>
        </div>
        <div class="divider">
        </div><input type="hidden" id="roleids" />
        <div class="accordion" fillspace="sidebar" layouth="90" style="float: left; display: block;
            overflow: auto; width: 240px; border: solid 1px #CCC; line-height: 21px; background: #fff">
            <div class="accordionHeader">
                <h2>
                    <span></span>角色</h2>
            </div>
            <ul id="tree" class="tree treeFolder treeCheck" oncheck="kkk">
                <asp:Repeater ID="RoleRpt" runat="server">
                    <ItemTemplate>
                        <li><a href="Role/RoleList.aspx?rid=<%#Eval("ID")%>&rel=jbsxBox" target="ajax" rel="jbsxBox" tname="ids" tvalue="<%#Eval("ID")%>">
                            <%#Eval("RoleName")%></a></li>
                    </ItemTemplate>
                </asp:Repeater>
            </ul>
        </div>
        <div class="tabs">
		<div class="tabsHeader">
			<div class="tabsHeaderContent">
				<ul>
					<li><a href="javascript:;"><span>权限分配</span></a></li>
				</ul>
			</div>
		</div>
		<div class="tabsContent">
			<div>
	
				
				
				<div id="jbsxBox" class="unitBox" >
				</div>
	
			</div>
			
		</div>
		<div class="tabsFooter">
			<div class="tabsFooterContent"></div>
		</div>
	</div>
    </div>
    <script type="text/javascript">
        function kkk() {
            var ids = '';
            var checkboxa = jQuery("input[name='ids']:checked").each(function () {
                var channels = jQuery(this).val();
                ids += channels+",";
            });
            ids = ids.substr(0, ids.length - 1);
            $("#roleids").val(ids);
        }
        function RoleEdit() {
            if ($("#roleids").val() != "" && $("#roleids").val().length==1) {
                $.pdialog.open('Role/RoleEdit.aspx?rel=' + $("#rel").val() + '&ids=' + $("#roleids").val(), 'edit', '编辑角色', 'width:100px,height:100px,max:true,mask:true,mixable:true,minable:true,resizable:true,drawable:true,fresh:true,close:"function"');
            } else {
                alertMsg.error('请选择一个用户！')
            }
        }
</script>
</body>
</html>
